package com.vol.miyao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.vol.entity.TData;
import com.vol.entity.QxWxdNr;
import com.vol.mapper.QxWxdNrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxdService {

    @Autowired
    private QxWxdNrMapper qxWxdNrMapper;

    public TData<List<QxWxdNr>> GetList(int topNum){
        TData<List<QxWxdNr>> obj = new TData<>();
        LambdaQueryWrapper<QxWxdNr> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.last(" LIMIT " + topNum);
        obj.Data = qxWxdNrMapper.selectList(lambdaQueryWrapper);
        obj.Tag = 1;
        return obj;
    }
}
